package com.loongtech.bi.entity.client;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;

@Entity
@Table(name = "iterative_event_analysis_devicemodel")
public class EntityIterativeEventAnalysisByPhone implements Serializable{
	private static final long serialVersionUID = 2L;
	
	@Id
	@Column(columnDefinition="varchar(32)")
	private String startday;  // 开始时间
	@Id
	@Column(columnDefinition="varchar(32)")
	private String endday;  // 结束时间
	@Id
	@Column(columnDefinition="varchar(64)")
	private String serverid;
	@Id
	@Column(columnDefinition="varchar(64)")
	private String channelid;
	@Id
	@Column(columnDefinition="varchar(32)")
	private String platformid;
	@Id
    @Column(columnDefinition="varchar(64)")
    private String stepcode;
    @Id
    @Column(columnDefinition="varchar(64)")
    private String devicemodel;
	@Column(columnDefinition="int(11) NOT NULL default 0")
	private Integer uuidnum;
	
	public String getStartday() {
		return startday;
	}
	public void setStartday(String startday) {
		this.startday = startday;
	}
	public String getEndday() {
		return endday;
	}
	public void setEndday(String endday) {
		this.endday = endday;
	}
	public String getServerid() {
		return serverid;
	}
	public void setServerid(String serverid) {
		this.serverid = serverid;
	}
	public String getChannelid() {
		return channelid;
	}
	public void setChannelid(String channelid) {
		this.channelid = channelid;
	}
	public String getPlatformid() {
		return platformid;
	}
	public void setPlatformid(String platformid) {
		this.platformid = platformid;
	}
	public String getStepcode() {
		return stepcode;
	}
	public void setStepcode(String stepcode) {
		this.stepcode = stepcode;
	}
	public Integer getUuidnum() {
		return uuidnum;
	}
	public void setUuidnum(Integer uuidnum) {
		this.uuidnum = uuidnum;
	}

    public String getDevicemodel() {
        return devicemodel;
    }

    public void setDevicemodel(String devicemodel) {
        this.devicemodel = devicemodel;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        EntityIterativeEventAnalysisByPhone that = (EntityIterativeEventAnalysisByPhone) o;

        if (startday != null ? !startday.equals(that.startday) : that.startday != null) return false;
        if (endday != null ? !endday.equals(that.endday) : that.endday != null) return false;
        if (serverid != null ? !serverid.equals(that.serverid) : that.serverid != null) return false;
        if (channelid != null ? !channelid.equals(that.channelid) : that.channelid != null) return false;
        if (platformid != null ? !platformid.equals(that.platformid) : that.platformid != null) return false;
        if (stepcode != null ? !stepcode.equals(that.stepcode) : that.stepcode != null) return false;
        if (devicemodel != null ? !devicemodel.equals(that.devicemodel) : that.devicemodel != null) return false;
        return uuidnum != null ? uuidnum.equals(that.uuidnum) : that.uuidnum == null;
    }

    @Override
    public int hashCode() {
        int result = startday != null ? startday.hashCode() : 0;
        result = 31 * result + (endday != null ? endday.hashCode() : 0);
        result = 31 * result + (serverid != null ? serverid.hashCode() : 0);
        result = 31 * result + (channelid != null ? channelid.hashCode() : 0);
        result = 31 * result + (platformid != null ? platformid.hashCode() : 0);
        result = 31 * result + (stepcode != null ? stepcode.hashCode() : 0);
        result = 31 * result + (devicemodel != null ? devicemodel.hashCode() : 0);
        result = 31 * result + (uuidnum != null ? uuidnum.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "EntityIterativeEventAnalysisByPhone{" +
                "startday='" + startday + '\'' +
                ", endday='" + endday + '\'' +
                ", serverid='" + serverid + '\'' +
                ", channelid='" + channelid + '\'' +
                ", platformid='" + platformid + '\'' +
                ", stepcode='" + stepcode + '\'' +
                ", devicemodel='" + devicemodel + '\'' +
                ", uuidnum=" + uuidnum +
                '}';
    }
}
